package com.twu.biblioteca;

/**
 * Created by venus on 13/09/14.
 */
public class Book implements ILibraryItem {
    public Book(String title, String author, int publishedYear) {
        this.title = title;
        this.author = author;
        this.publishedYear = publishedYear;
    }

    private String title;
    private String author;
    private int publishedYear;
    private boolean isAvailable = true;

    @Override
    public String getName() {
        return this.title;
    }

    @Override
    public boolean isAvailable() {
        return this.isAvailable;
    }

    @Override
    public void setAvailable(boolean isAvailable) {
        this.isAvailable = isAvailable;
    }

    public int getPublishedYear() {
        return this.publishedYear;
    }

    public String getAuthor() {
        return this.author;
    }

    @Override
    public String provideDetails(){
        String details = "Title: " + this.getName() + " | By " + this.getAuthor() + " | Published Year: " + this.getPublishedYear() ;
        return details;
    }
}
